The adapter degraded state is an additional state for adapters besides connected or disconnected. The degraded state is for various areas in between. Examples include:
- One method of communication for an adapter has been disconnected, but another is still active.
- The adapter is connected, but it the connection is unstable.
- Some functions related to a mode of communication fail to respond.
To use this additional state:
Add the following code block to instances where you would like to send the adapter to the 'degraded' state:
this.emit("DEGRADED", { reason: 'Reason adapter is degraded (will appear on system page' });
Add the following code block at instances where the adapter is no longer degraded, and the state should be removed. For example, if the second method of communication comes back online, the connection stabilizes, or a specific call succeeds:
this.emit("FIXED", { reason: 'Optional' });
Open the system page. When the adapter is degraded, the connection dot will change to yellow, and upon hover, the reason for the state will display. Likewise, it will return to green when the adapter connection is no longer degraded.